package com.thd.springboottest.kafka.consumerlistener;

import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

/**
 * com.thd.springboottest.kafka.consumerlistener.KafkaConsumerListener
 *
 * @author: wanglei62
 * @DATE: 2022/3/29 15:46
 **/
@Component
public class KafkaConsumerListener {
    @KafkaListener(topics = {"test"},groupId = "group1", containerFactory="kafkaListenerContainerFactory")
    public void kafkaListener(String message){
        System.out.println("消费者进行消费：" + message);
    }
}
